package j.framework.query.core;

/**
 * 查询列上的footer定义
 * Created by junhai on 2015/1/3.
 */
public class QueryFieldFooter implements java.io.Serializable {

    private String queryFieldId;

    private String functionType;

    private String formatOptions;

    private int rowIndex;

    public String getQueryFieldId() {
        return queryFieldId;
    }
    public void setQueryFieldId(String queryFieldId) {
        this.queryFieldId = queryFieldId;
    }

    public String getFunctionType() {
        return functionType;
    }
    public void setFunctionType(String functionType) {
        this.functionType = functionType;
    }

    public String getFormatOptions() {
        return formatOptions;
    }
    public void setFormatOptions(String formatOptions) {
        this.formatOptions = formatOptions;
    }

    public int getRowIndex() {
        return rowIndex;
    }
    public void setRowIndex(int rowIndex) {
        this.rowIndex = rowIndex;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        QueryFieldFooter that = (QueryFieldFooter) o;

        if (rowIndex != that.rowIndex) return false;
        if (functionType != null ? !functionType.equals(that.functionType) : that.functionType != null) return false;
        if (queryFieldId != null ? !queryFieldId.equals(that.queryFieldId) : that.queryFieldId != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = queryFieldId != null ? queryFieldId.hashCode() : 0;
        result = 31 * result + (functionType != null ? functionType.hashCode() : 0);
        result = 31 * result + rowIndex;
        return result;
    }
}
